<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>String Utility Functions</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
<link rel="prev" href="glib-utilities.html" title="GLib Utilities">
<link rel="next" href="glib-Character-Set-Conversion.html" title="Character Set Conversion">
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="glib.html" title="GLib Overview">
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
<link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
<link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
<link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
<link rel="chapter" href="tools.html" title="GLib Tools">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
<link rel="index" href="ix10.html" title="Index of new symbols in 2.16">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-utilities.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-Character-Set-Conversion.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3018958" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id3021090" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="glib-String-Utility-Functions"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3018958"></a><span class="refentrytitle">String Utility Functions</span>
</h2>
<p>String Utility Functions &#8212; various string-related functions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;glib.h&gt;
#include &lt;glib/gprintf.h&gt;


<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strdup">g_strdup</a>                            (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strndup">g_strndup</a>                           (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> n);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>**             <a class="link" href="glib-String-Utility-Functions.html#g-strdupv">g_strdupv</a>                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **str_array);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strnfill">g_strnfill</a>                          (<a class="link" href="glib-Basic-Types.html#gsize">gsize</a> length,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> fill_char);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-stpcpy">g_stpcpy</a>                            (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *dest,
                                                         const char *src);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strstr-len">g_strstr_len</a>                        (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *haystack,
                                                         <a class="link" href="glib-Basic-Types.html#gssize">gssize</a> haystack_len,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *needle);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strrstr">g_strrstr</a>                           (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *haystack,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *needle);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strrstr-len">g_strrstr_len</a>                       (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *haystack,
                                                         <a class="link" href="glib-Basic-Types.html#gssize">gssize</a> haystack_len,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *needle);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-str-has-prefix">g_str_has_prefix</a>                    (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *prefix);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-str-has-suffix">g_str_has_suffix</a>                    (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *suffix);

<a class="link" href="glib-Basic-Types.html#gsize">gsize</a>               <a class="link" href="glib-String-Utility-Functions.html#g-strlcpy">g_strlcpy</a>                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *dest,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *src,
                                                         <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> dest_size);
<a class="link" href="glib-Basic-Types.html#gsize">gsize</a>               <a class="link" href="glib-String-Utility-Functions.html#g-strlcat">g_strlcat</a>                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *dest,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *src,
                                                         <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> dest_size);

<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strdup-printf">g_strdup_printf</a>                     (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         ...);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strdup-vprintf">g_strdup_vprintf</a>                    (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         va_list args);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-printf">g_printf</a>                            (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         ...);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-vprintf">g_vprintf</a>                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-fprintf">g_fprintf</a>                           (FILE *file,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         ...);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-vfprintf">g_vfprintf</a>                          (FILE *file,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-sprintf">g_sprintf</a>                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         ...);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-vsprintf">g_vsprintf</a>                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-snprintf">g_snprintf</a>                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         <a class="link" href="glib-Basic-Types.html#gulong">gulong</a> n,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         ...);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-vsnprintf">g_vsnprintf</a>                         (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         <a class="link" href="glib-Basic-Types.html#gulong">gulong</a> n,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-vasprintf">g_vasprintf</a>                         (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **string,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);
<a class="link" href="glib-Basic-Types.html#gsize">gsize</a>               <a class="link" href="glib-String-Utility-Functions.html#g-printf-string-upper-bound">g_printf_string_upper_bound</a>         (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         va_list args);

<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-isalnum">g_ascii_isalnum</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-isalpha">g_ascii_isalpha</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-iscntrl">g_ascii_iscntrl</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-isdigit">g_ascii_isdigit</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-isgraph">g_ascii_isgraph</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-islower">g_ascii_islower</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-isprint">g_ascii_isprint</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-ispunct">g_ascii_ispunct</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-isspace">g_ascii_isspace</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-isupper">g_ascii_isupper</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-String-Utility-Functions.html#g-ascii-isxdigit">g_ascii_isxdigit</a>                    (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);

<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-ascii-digit-value">g_ascii_digit_value</a>                 (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-ascii-xdigit-value">g_ascii_xdigit_value</a>                (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);

<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strcasecmp">g_ascii_strcasecmp</a>                  (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s1,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s2);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strncasecmp">g_ascii_strncasecmp</a>                 (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s1,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s2,
                                                         <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> n);

<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strup">g_ascii_strup</a>                       (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         <a class="link" href="glib-Basic-Types.html#gssize">gssize</a> len);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strdown">g_ascii_strdown</a>                     (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         <a class="link" href="glib-Basic-Types.html#gssize">gssize</a> len);

<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>               <a class="link" href="glib-String-Utility-Functions.html#g-ascii-tolower">g_ascii_tolower</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>               <a class="link" href="glib-String-Utility-Functions.html#g-ascii-toupper">g_ascii_toupper</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);

<a class="link" href="glib-Strings.html#GString">GString</a>*            <a class="link" href="glib-String-Utility-Functions.html#g-string-ascii-up">g_string_ascii_up</a>                   (<a class="link" href="glib-Strings.html#GString">GString</a> *string);
<a class="link" href="glib-Strings.html#GString">GString</a>*            <a class="link" href="glib-String-Utility-Functions.html#g-string-ascii-down">g_string_ascii_down</a>                 (<a class="link" href="glib-Strings.html#GString">GString</a> *string);

<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strup">g_strup</a>                             (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strdown">g_strdown</a>                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);

<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-strcasecmp">g_strcasecmp</a>                        (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s1,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s2);
<a class="link" href="glib-Basic-Types.html#gint">gint</a>                <a class="link" href="glib-String-Utility-Functions.html#g-strncasecmp">g_strncasecmp</a>                       (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s1,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s2,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);

<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strreverse">g_strreverse</a>                        (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);

<a class="link" href="glib-Basic-Types.html#gint64">gint64</a>              <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strtoll">g_ascii_strtoll</a>                     (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *nptr,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **endptr,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> base);
<a class="link" href="glib-Basic-Types.html#guint64">guint64</a>             <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strtoull">g_ascii_strtoull</a>                    (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *nptr,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **endptr,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> base);
#define             <a class="link" href="glib-String-Utility-Functions.html#G-ASCII-DTOSTR-BUF-SIZE:CAPS">G_ASCII_DTOSTR_BUF_SIZE</a>
<a class="link" href="glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strtod">g_ascii_strtod</a>                      (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *nptr,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **endptr);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-ascii-dtostr">g_ascii_dtostr</a>                      (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *buffer,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> buf_len,
                                                         <a class="link" href="glib-Basic-Types.html#gdouble">gdouble</a> d);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-ascii-formatd">g_ascii_formatd</a>                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *buffer,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> buf_len,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         <a class="link" href="glib-Basic-Types.html#gdouble">gdouble</a> d);
<a class="link" href="glib-Basic-Types.html#gdouble">gdouble</a>             <a class="link" href="glib-String-Utility-Functions.html#g-strtod">g_strtod</a>                            (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *nptr,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **endptr);

<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strchug">g_strchug</a>                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strchomp">g_strchomp</a>                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);
#define             <a class="link" href="glib-String-Utility-Functions.html#g-strstrip">g_strstrip</a>                          ( string )

<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strdelimit">g_strdelimit</a>                        (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *delimiters,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> new_delimiter);
#define             <a class="link" href="glib-String-Utility-Functions.html#G-STR-DELIMITERS:CAPS">G_STR_DELIMITERS</a>
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strescape">g_strescape</a>                         (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *source,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *exceptions);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strcompress">g_strcompress</a>                       (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *source);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strcanon">g_strcanon</a>                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *valid_chars,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> substitutor);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>**             <a class="link" href="glib-String-Utility-Functions.html#g-strsplit">g_strsplit</a>                          (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *delimiter,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> max_tokens);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>**             <a class="link" href="glib-String-Utility-Functions.html#g-strsplit-set">g_strsplit_set</a>                      (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *delimiters,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> max_tokens);
void                <a class="link" href="glib-String-Utility-Functions.html#g-strfreev">g_strfreev</a>                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **str_array);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strconcat">g_strconcat</a>                         (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string1,
                                                         ...);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strjoin">g_strjoin</a>                           (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *separator,
                                                         ...);
<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              <a class="link" href="glib-String-Utility-Functions.html#g-strjoinv">g_strjoinv</a>                          (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *separator,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **str_array);
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-String-Utility-Functions.html#g-strv-length">g_strv_length</a>                       (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **str_array);

const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        <a class="link" href="glib-String-Utility-Functions.html#g-strerror">g_strerror</a>                          (<a class="link" href="glib-Basic-Types.html#gint">gint</a> errnum);
const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        <a class="link" href="glib-String-Utility-Functions.html#g-strsignal">g_strsignal</a>                         (<a class="link" href="glib-Basic-Types.html#gint">gint</a> signum);

</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3021090"></a><h2>Description</h2>
<p>
This section describes a number of utility functions for creating,
duplicating, and manipulating strings.
</p>
<p>
Note that the functions <a class="link" href="glib-String-Utility-Functions.html#g-printf"><code class="function">g_printf()</code></a>, <a class="link" href="glib-String-Utility-Functions.html#g-fprintf"><code class="function">g_fprintf()</code></a>, <a class="link" href="glib-String-Utility-Functions.html#g-sprintf"><code class="function">g_sprintf()</code></a>, <a class="link" href="glib-String-Utility-Functions.html#g-snprintf"><code class="function">g_snprintf()</code></a>,
<a class="link" href="glib-String-Utility-Functions.html#g-vprintf"><code class="function">g_vprintf()</code></a>, <a class="link" href="glib-String-Utility-Functions.html#g-vfprintf"><code class="function">g_vfprintf()</code></a>, <a class="link" href="glib-String-Utility-Functions.html#g-vsprintf"><code class="function">g_vsprintf()</code></a> and <a class="link" href="glib-String-Utility-Functions.html#g-vsnprintf"><code class="function">g_vsnprintf()</code></a> are declared in 
the header <code class="filename">gprintf.h</code> which is <span class="emphasis"><em>not</em></span>
included in <code class="filename">glib.h</code> (otherwise using 
<code class="filename">glib.h</code> would drag in <code class="filename">stdio.h</code>), so
you'll have to explicitly include <code class="literal">&lt;glib/gprintf.h&gt;</code> 
in order to use the GLib <code class="function">printf()</code> functions. 
</p>
<p><a name="string-precision"></a>
While you may use the <code class="function">printf()</code> functions to format UTF-8 strings, notice that
the precision of a <code class="literal">%Ns</code> parameter is interpreted as the
number of <span class="emphasis"><em>bytes</em></span>, not <span class="emphasis"><em>characters</em></span> to print.
On top of that, the GNU libc implementation of the <code class="function">printf()</code> functions has the "feature"
that it checks that the string given for the <code class="literal">%Ns</code> parameter
consists of a whole number of characters in the current encoding. So, unless you
are sure you are always going to be in an UTF-8 locale or your know your text is restricted 
to ASCII, avoid using <code class="literal">%Ns</code>.
If your intention is to format strings for a certain number of columns, then 
<code class="literal">%Ns</code> is not a correct solution anyway, since it fails to take 
wide characters (see <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide"><code class="function">g_unichar_iswide()</code></a>) into account.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id3021318"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3021329"></a><h3>
<a name="g-strdup"></a>g_strdup ()</h3>
<a class="indexterm" name="id3021341"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strdup                            (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str);</pre>
<p>
Duplicates a string.
If <em class="parameter"><code>str</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it returns <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
The returned string should be freed when no longer needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></p></td>
<td>the string to duplicate.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a newly-allocated copy of <em class="parameter"><code>str</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3021432"></a><h3>
<a name="g-strndup"></a>g_strndup ()</h3>
<a class="indexterm" name="id3021445"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strndup                           (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> n);</pre>
<p>
Duplicates the first <em class="parameter"><code>n</code></em> bytes of a string, returning a newly-allocated
buffer <em class="parameter"><code>n</code></em> + 1 bytes long which will always be nul-terminated.
If <em class="parameter"><code>str</code></em> is less than <em class="parameter"><code>n</code></em> bytes long the buffer is padded with nuls.
If <em class="parameter"><code>str</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> it returns <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
The returned value should be freed when no longer needed.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
To copy a number of characters from a UTF-8 encoded string, use
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strncpy"><code class="function">g_utf8_strncpy()</code></a> instead.
</p>
</div>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></p></td>
<td> the string to duplicate
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the maximum number of bytes to copy from <em class="parameter"><code>str</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a newly-allocated buffer containing the first <em class="parameter"><code>n</code></em> bytes 
         of <em class="parameter"><code>str</code></em>, nul-terminated 
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3021618"></a><h3>
<a name="g-strdupv"></a>g_strdupv ()</h3>
<a class="indexterm" name="id3021630"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>**             g_strdupv                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **str_array);</pre>
<p>
Copies <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings. The copy is a deep copy;
the new array should be freed by first freeing each string, then
the array itself. <a class="link" href="glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> does this for you. If called
on a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> value, <a class="link" href="glib-String-Utility-Functions.html#g-strdupv"><code class="function">g_strdupv()</code></a> simply returns <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str_array</code></em>&#160;:</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a new <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3021765"></a><h3>
<a name="g-strnfill"></a>g_strnfill ()</h3>
<a class="indexterm" name="id3021778"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strnfill                          (<a class="link" href="glib-Basic-Types.html#gsize">gsize</a> length,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> fill_char);</pre>
<p>
Creates a new string <em class="parameter"><code>length</code></em> bytes long filled with <em class="parameter"><code>fill_char</code></em>.
The returned string should be freed when no longer needed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em>&#160;:</span></p></td>
<td> the length of the new string
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fill_char</code></em>&#160;:</span></p></td>
<td> the byte to fill the string with
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a newly-allocated string filled the <em class="parameter"><code>fill_char</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3021880"></a><h3>
<a name="g-stpcpy"></a>g_stpcpy ()</h3>
<a class="indexterm" name="id3021893"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_stpcpy                            (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *dest,
                                                         const char *src);</pre>
<p>
Copies a nul-terminated string into the dest buffer, include the
trailing nul, and return a pointer to the trailing nul byte.
This is useful for concatenating multiple strings together
without having to repeatedly scan for the end.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></p></td>
<td> destination buffer.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></p></td>
<td> source string.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a pointer to trailing nul byte.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3021979"></a><h3>
<a name="g-strstr-len"></a>g_strstr_len ()</h3>
<a class="indexterm" name="id3021992"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strstr_len                        (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *haystack,
                                                         <a class="link" href="glib-Basic-Types.html#gssize">gssize</a> haystack_len,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *needle);</pre>
<p>
Searches the string <em class="parameter"><code>haystack</code></em> for the first occurrence
of the string <em class="parameter"><code>needle</code></em>, limiting the length of the search
to <em class="parameter"><code>haystack_len</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>haystack</code></em>&#160;:</span></p></td>
<td> a string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>haystack_len</code></em>&#160;:</span></p></td>
<td> the maximum length of <em class="parameter"><code>haystack</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>needle</code></em>&#160;:</span></p></td>
<td> the string to search for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a pointer to the found occurrence, or
   <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3022132"></a><h3>
<a name="g-strrstr"></a>g_strrstr ()</h3>
<a class="indexterm" name="id3022145"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strrstr                           (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *haystack,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *needle);</pre>
<p>
Searches the string <em class="parameter"><code>haystack</code></em> for the last occurrence
of the string <em class="parameter"><code>needle</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>haystack</code></em>&#160;:</span></p></td>
<td> a nul-terminated string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>needle</code></em>&#160;:</span></p></td>
<td> the nul-terminated string to search for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a pointer to the found occurrence, or
   <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3022251"></a><h3>
<a name="g-strrstr-len"></a>g_strrstr_len ()</h3>
<a class="indexterm" name="id3022264"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strrstr_len                       (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *haystack,
                                                         <a class="link" href="glib-Basic-Types.html#gssize">gssize</a> haystack_len,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *needle);</pre>
<p>
Searches the string <em class="parameter"><code>haystack</code></em> for the last occurrence
of the string <em class="parameter"><code>needle</code></em>, limiting the length of the search
to <em class="parameter"><code>haystack_len</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>haystack</code></em>&#160;:</span></p></td>
<td> a nul-terminated string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>haystack_len</code></em>&#160;:</span></p></td>
<td> the maximum length of <em class="parameter"><code>haystack</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>needle</code></em>&#160;:</span></p></td>
<td> the nul-terminated string to search for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a pointer to the found occurrence, or
   <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3022405"></a><h3>
<a name="g-str-has-prefix"></a>g_str_has_prefix ()</h3>
<a class="indexterm" name="id3022420"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_str_has_prefix                    (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *prefix);</pre>
<p>
Looks whether the string <em class="parameter"><code>str</code></em> begins with <em class="parameter"><code>prefix</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></p></td>
<td> a nul-terminated string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em>&#160;:</span></p></td>
<td> the nul-terminated prefix to look for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> begins with <em class="parameter"><code>prefix</code></em>, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3022553"></a><h3>
<a name="g-str-has-suffix"></a>g_str_has_suffix ()</h3>
<a class="indexterm" name="id3022568"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_str_has_suffix                    (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *suffix);</pre>
<p>
Looks whether the string <em class="parameter"><code>str</code></em> ends with <em class="parameter"><code>suffix</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></p></td>
<td> a nul-terminated string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>suffix</code></em>&#160;:</span></p></td>
<td> the nul-terminated suffix to look for.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> end with <em class="parameter"><code>suffix</code></em>, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3022701"></a><h3>
<a name="g-strlcpy"></a>g_strlcpy ()</h3>
<a class="indexterm" name="id3022714"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gsize">gsize</a>               g_strlcpy                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *dest,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *src,
                                                         <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> dest_size);</pre>
<p>
Portability wrapper that calls <code class="function">strlcpy()</code> on systems which have it, and emulates
<code class="function">strlcpy()</code> otherwise. Copies <em class="parameter"><code>src</code></em> to <em class="parameter"><code>dest</code></em>; <em class="parameter"><code>dest</code></em> is guaranteed to be
nul-terminated; <em class="parameter"><code>src</code></em> must be nul-terminated; <em class="parameter"><code>dest_size</code></em> is the buffer size, not
the number of chars to copy. Caveat: <code class="function">strlcpy()</code> is supposedly more secure than
<code class="function">strcpy()</code> or <code class="function">strncpy()</code>, but if you really want to avoid screwups, <a class="link" href="glib-String-Utility-Functions.html#g-strdup"><code class="function">g_strdup()</code></a> is
an even better idea.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></p></td>
<td>destination buffer
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></p></td>
<td>source buffer
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_size</code></em>&#160;:</span></p></td>
<td>length of <em class="parameter"><code>dest</code></em> in bytes
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>length of <em class="parameter"><code>src</code></em>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3022925"></a><h3>
<a name="g-strlcat"></a>g_strlcat ()</h3>
<a class="indexterm" name="id3022937"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gsize">gsize</a>               g_strlcat                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *dest,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *src,
                                                         <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> dest_size);</pre>
<p>
Portability wrapper that calls <code class="function">strlcat()</code> on systems which have it, and emulates it otherwise. 
Appends nul-terminated <em class="parameter"><code>src</code></em> string to <em class="parameter"><code>dest</code></em>, guaranteeing
nul-termination for <em class="parameter"><code>dest</code></em>. The total size of <em class="parameter"><code>dest</code></em> won't exceed
<em class="parameter"><code>dest_size</code></em>. Caveat: this is supposedly a more secure alternative to <code class="function">strcat()</code> or
<code class="function">strncat()</code>, but for real security <a class="link" href="glib-String-Utility-Functions.html#g-strconcat"><code class="function">g_strconcat()</code></a> is harder to mess up.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em>&#160;:</span></p></td>
<td>destination buffer, already containing one nul-terminated string
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></p></td>
<td>source buffer
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_size</code></em>&#160;:</span></p></td>
<td>length of <em class="parameter"><code>dest</code></em> buffer in bytes (not length of existing string inside <em class="parameter"><code>dest</code></em>)
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>length of <em class="parameter"><code>src</code></em> plus initial length of string in <em class="parameter"><code>dest</code></em>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3023142"></a><h3>
<a name="g-strdup-printf"></a>g_strdup_printf ()</h3>
<a class="indexterm" name="id3023155"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strdup_printf                     (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         ...);</pre>
<p>
Similar to the standard C <code class="function">sprintf()</code> function
but safer, since it calculates the maximum space required and allocates
memory to hold the result.
The returned string should be freed when no longer needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td>a standard <code class="function">printf()</code> format string, but notice 
  <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td>
<td>the parameters to insert into the format string.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a newly-allocated string holding the result.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3023261"></a><h3>
<a name="g-strdup-vprintf"></a>g_strdup_vprintf ()</h3>
<a class="indexterm" name="id3023274"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strdup_vprintf                    (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         va_list args);</pre>
<p>
Similar to the standard C <code class="function">vsprintf()</code> function
but safer, since it calculates the maximum space required and allocates
memory to hold the result.
The returned string should be freed when no longer needed.
</p>
<p>
See also <a class="link" href="glib-String-Utility-Functions.html#g-vasprintf"><code class="function">g_vasprintf()</code></a>, which offers the same functionality, but additionally
returns the length of the allocated string. 
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td>a standard <code class="function">printf()</code> format string, but notice 
  <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em>&#160;:</span></p></td>
<td>the list of parameters to insert into the format string.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a newly-allocated string holding the result.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3023402"></a><h3>
<a name="g-printf"></a>g_printf ()</h3>
<a class="indexterm" name="id3023417"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_printf                            (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         ...);</pre>
<p>
An implementation of the standard <code class="function">printf()</code> function which supports 
positional parameters, as specified in the Single Unix Specification.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> a standard <code class="function">printf()</code> format string, but notice 
         <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td>
<td> the arguments to insert in the output.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the number of bytes printed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3023530"></a><h3>
<a name="g-vprintf"></a>g_vprintf ()</h3>
<a class="indexterm" name="id3023544"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_vprintf                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);</pre>
<p>
An implementation of the standard <code class="function">vprintf()</code> function which supports 
positional parameters, as specified in the Single Unix Specification.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> a standard <code class="function">printf()</code> format string, but notice 
         <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em>&#160;:</span></p></td>
<td> the list of arguments to insert in the output.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the number of bytes printed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3023666"></a><h3>
<a name="g-fprintf"></a>g_fprintf ()</h3>
<a class="indexterm" name="id3023681"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_fprintf                           (FILE *file,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         ...);</pre>
<p>
An implementation of the standard <code class="function">fprintf()</code> function which supports 
positional parameters, as specified in the Single Unix Specification.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>file</code></em>&#160;:</span></p></td>
<td> the stream to write to.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> a standard <code class="function">printf()</code> format string, but notice 
         <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td>
<td> the arguments to insert in the output.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the number of bytes printed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3023817"></a><h3>
<a name="g-vfprintf"></a>g_vfprintf ()</h3>
<a class="indexterm" name="id3023832"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_vfprintf                          (FILE *file,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);</pre>
<p>
An implementation of the standard <code class="function">fprintf()</code> function which supports 
positional parameters, as specified in the Single Unix Specification.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>file</code></em>&#160;:</span></p></td>
<td> the stream to write to.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> a standard <code class="function">printf()</code> format string, but notice 
         <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em>&#160;:</span></p></td>
<td> the list of arguments to insert in the output.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the number of bytes printed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3023974"></a><h3>
<a name="g-sprintf"></a>g_sprintf ()</h3>
<a class="indexterm" name="id3023988"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_sprintf                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         ...);</pre>
<p>
An implementation of the standard <code class="function">sprintf()</code> function which supports 
positional parameters, as specified in the Single Unix Specification.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> A pointer to a memory buffer to contain the resulting string. It 
         is up to the caller to ensure that the allocated buffer is large 
         enough to hold the formatted result
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> a standard <code class="function">printf()</code> format string, but notice 
         <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td>
<td> the arguments to insert in the output.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the number of bytes printed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3024126"></a><h3>
<a name="g-vsprintf"></a>g_vsprintf ()</h3>
<a class="indexterm" name="id3024140"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_vsprintf                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);</pre>
<p>
An implementation of the standard <code class="function">vsprintf()</code> function which supports 
positional parameters, as specified in the Single Unix Specification.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> the buffer to hold the output.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> a standard <code class="function">printf()</code> format string, but notice 
         <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em>&#160;:</span></p></td>
<td> the list of arguments to insert in the output.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the number of bytes printed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3024282"></a><h3>
<a name="g-snprintf"></a>g_snprintf ()</h3>
<a class="indexterm" name="id3024295"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_snprintf                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         <a class="link" href="glib-Basic-Types.html#gulong">gulong</a> n,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         ...);</pre>
<p>
A safer form of the standard <code class="function">sprintf()</code> function. The output is guaranteed
to not exceed <em class="parameter"><code>n</code></em> characters (including the terminating nul character), so 
it is easy to ensure that a buffer overflow cannot occur.
</p>
<p>
See also <a class="link" href="glib-String-Utility-Functions.html#g-strdup-printf"><code class="function">g_strdup_printf()</code></a>.
</p>
<p>
In versions of GLib prior to 1.2.3, this function may return -1 if the 
output was truncated, and the truncated string may not be nul-terminated. 
In versions prior to 1.3.12, this function returns the length of the output 
string.
</p>
<p>
The return value of <a class="link" href="glib-String-Utility-Functions.html#g-snprintf"><code class="function">g_snprintf()</code></a> conforms to the <code class="function">snprintf()</code>
function as standardized in ISO C99. Note that this is different from 
traditional <code class="function">snprintf()</code>, which returns the length of the output string.
</p>
<p>
The format string may contain positional parameters, as specified in 
the Single Unix Specification.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> the buffer to hold the output.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the maximum number of bytes to produce (including the 
    terminating nul character).
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> a standard <code class="function">printf()</code> format string, but notice 
         <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td>
<td> the arguments to insert in the output.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the number of bytes which would be produced if the buffer 
    was large enough.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3024518"></a><h3>
<a name="g-vsnprintf"></a>g_vsnprintf ()</h3>
<a class="indexterm" name="id3024530"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_vsnprintf                         (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         <a class="link" href="glib-Basic-Types.html#gulong">gulong</a> n,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);</pre>
<p>
A safer form of the standard <code class="function">vsprintf()</code> function. The output is guaranteed
to not exceed <em class="parameter"><code>n</code></em> characters (including the terminating nul character), so 
it is easy to ensure that a buffer overflow cannot occur.
</p>
<p>
See also <a class="link" href="glib-String-Utility-Functions.html#g-strdup-vprintf"><code class="function">g_strdup_vprintf()</code></a>.
</p>
<p>
In versions of GLib prior to 1.2.3, this function may return -1 if the 
output was truncated, and the truncated string may not be nul-terminated.
In versions prior to 1.3.12, this function returns the length of the output 
string.
</p>
<p>
The return value of <a class="link" href="glib-String-Utility-Functions.html#g-vsnprintf"><code class="function">g_vsnprintf()</code></a> conforms to the <code class="function">vsnprintf()</code> function 
as standardized in ISO C99. Note that this is different from traditional 
<code class="function">vsnprintf()</code>, which returns the length of the output string.
</p>
<p>
The format string may contain positional parameters, as specified in 
the Single Unix Specification.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> the buffer to hold the output.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the maximum number of bytes to produce (including the 
    terminating nul character).
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> a standard <code class="function">printf()</code> format string, but notice 
         <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em>&#160;:</span></p></td>
<td> the list of arguments to insert in the output.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the number of bytes which would be produced if the buffer 
 was large enough.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3024760"></a><h3>
<a name="g-vasprintf"></a>g_vasprintf ()</h3>
<a class="indexterm" name="id3024775"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_vasprintf                         (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **string,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> const *format,
                                                         va_list args);</pre>
<p>
An implementation of the GNU <code class="function">vasprintf()</code> function which supports 
positional parameters, as specified in the Single Unix Specification.
This function is similar to <a class="link" href="glib-String-Utility-Functions.html#g-vsprintf"><code class="function">g_vsprintf()</code></a>, except that it allocates a 
string to hold the output, instead of putting the output in a buffer 
you allocate in advance.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> the return location for the newly-allocated string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> a standard <code class="function">printf()</code> format string, but notice
         <a class="link" href="glib-String-Utility-Functions.html#string-precision">string precision pitfalls</a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em>&#160;:</span></p></td>
<td> the list of arguments to insert in the output.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the number of bytes printed.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3024932"></a><h3>
<a name="g-printf-string-upper-bound"></a>g_printf_string_upper_bound ()</h3>
<a class="indexterm" name="id3024946"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gsize">gsize</a>               g_printf_string_upper_bound         (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         va_list args);</pre>
<p>
Calculates the maximum space needed to store the output of the <code class="function">sprintf()</code> 
function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td>the format string. See the <code class="function">printf()</code> documentation.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em>&#160;:</span></p></td>
<td>the parameters to be inserted into the format string.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the maximum space needed to store the formatted string.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3025047"></a><h3>
<a name="g-ascii-isalnum"></a>g_ascii_isalnum ()</h3>
<a class="indexterm" name="id3025060"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_isalnum                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is alphanumeric.
</p>
<p>
Unlike the standard C library <code class="function">isalnum()</code> function, this only
recognizes standard ASCII letters and ignores the locale, returning
<a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for all non-ASCII characters. Also unlike the standard
library function, this takes a <span class="type">char</span>, not an <span class="type">int</span>, 
so don't call it on <code class="literal">EOF</code> but no need to cast to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> before passing a 
possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII alphanumeric character


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3025190"></a><h3>
<a name="g-ascii-isalpha"></a>g_ascii_isalpha ()</h3>
<a class="indexterm" name="id3025202"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_isalpha                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is alphabetic (i.e. a letter).
</p>
<p>
Unlike the standard C library <code class="function">isalpha()</code> function, this only
recognizes standard ASCII letters and ignores the locale, returning
<a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for all non-ASCII characters. Also unlike the standard
library function, this takes a <span class="type">char</span>, not an <span class="type">int</span>, 
so don't call it on <code class="literal">EOF</code> but no need to cast to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> before passing a 
possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII alphabetic character


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3025330"></a><h3>
<a name="g-ascii-iscntrl"></a>g_ascii_iscntrl ()</h3>
<a class="indexterm" name="id3025343"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_iscntrl                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is a control character.
</p>
<p>
Unlike the standard C library <code class="function">iscntrl()</code> function, this only
recognizes standard ASCII control characters and ignores the locale,
returning <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for all non-ASCII characters. Also unlike the standard
library function, this takes a <span class="type">char</span>, not an <span class="type">int</span>, 
so don't call it on <code class="literal">EOF</code> but no need to cast to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> before passing a 
possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII control character.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3025471"></a><h3>
<a name="g-ascii-isdigit"></a>g_ascii_isdigit ()</h3>
<a class="indexterm" name="id3025484"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_isdigit                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is digit (0-9).
</p>
<p>
Unlike the standard C library <code class="function">isdigit()</code> function,
this takes a <span class="type">char</span>, not an <span class="type">int</span>, so don't call it
on <code class="literal">EOF</code> but no need to cast to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> before passing a possibly
non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII digit.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3025599"></a><h3>
<a name="g-ascii-isgraph"></a>g_ascii_isgraph ()</h3>
<a class="indexterm" name="id3025612"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_isgraph                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is a printing character and not a space.
</p>
<p>
Unlike the standard C library <code class="function">isgraph()</code> function, 
this only recognizes standard ASCII characters and ignores the locale, 
returning <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for all non-ASCII characters. Also unlike the standard
library function, this takes a <span class="type">char</span>, not an <span class="type">int</span>, 
so don't call it on <code class="literal">EOF</code> but no need to cast to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> before passing a 
possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII printing character other than space.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3025740"></a><h3>
<a name="g-ascii-islower"></a>g_ascii_islower ()</h3>
<a class="indexterm" name="id3025753"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_islower                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is an ASCII lower case letter.
</p>
<p>
Unlike the standard C library <code class="function">islower()</code> function, 
this only recognizes standard ASCII letters and ignores the locale,
returning <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for all non-ASCII characters. Also unlike the standard
library function, this takes a <span class="type">char</span>, not an <span class="type">int</span>, 
so don't call it on <code class="literal">EOF</code> but no need to worry about casting to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> 
before passing a possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII lower case letter


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3025881"></a><h3>
<a name="g-ascii-isprint"></a>g_ascii_isprint ()</h3>
<a class="indexterm" name="id3025894"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_isprint                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is a printing character.
</p>
<p>
Unlike the standard C library <code class="function">isprint()</code> function, 
this only recognizes standard ASCII characters and ignores the locale, 
returning <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for all non-ASCII characters. Also unlike the standard
library function, this takes a <span class="type">char</span>, not an <span class="type">int</span>, 
so don't call it on <code class="literal">EOF</code> but no need to cast to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> before passing a 
possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII printing character.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3026022"></a><h3>
<a name="g-ascii-ispunct"></a>g_ascii_ispunct ()</h3>
<a class="indexterm" name="id3026034"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_ispunct                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is a punctuation character.
</p>
<p>
Unlike the standard C library <code class="function">ispunct()</code> function, 
this only recognizes standard ASCII letters and ignores the locale, 
returning <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for all non-ASCII characters. Also unlike the standard
library function, this takes a <span class="type">char</span>, not an <span class="type">int</span>, 
so don't call it on <code class="literal">EOF</code> but no need to cast to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> before passing a 
possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII punctuation character.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3026162"></a><h3>
<a name="g-ascii-isspace"></a>g_ascii_isspace ()</h3>
<a class="indexterm" name="id3026175"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_isspace                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is a white-space character.
</p>
<p>
Unlike the standard C library <code class="function">isspace()</code> function, 
this only recognizes standard ASCII white-space and ignores the locale, 
returning <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for all non-ASCII characters. Also unlike the standard
library function, this takes a <span class="type">char</span>, not an <span class="type">int</span>, 
so don't call it on <code class="literal">EOF</code> but no need to cast to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> before passing a 
possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII white-space character


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3026304"></a><h3>
<a name="g-ascii-isupper"></a>g_ascii_isupper ()</h3>
<a class="indexterm" name="id3026316"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_isupper                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is an ASCII upper case letter.
</p>
<p>
Unlike the standard C library <code class="function">isupper()</code> function, 
this only recognizes standard ASCII letters and ignores the locale, 
returning <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for all non-ASCII characters. Also unlike the standard
library function, this takes a <span class="type">char</span>, not an <span class="type">int</span>, 
so don't call it on <code class="literal">EOF</code> but no need to worry about casting to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> 
before passing a possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII upper case letter


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3026444"></a><h3>
<a name="g-ascii-isxdigit"></a>g_ascii_isxdigit ()</h3>
<a class="indexterm" name="id3026457"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_ascii_isxdigit                    (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines whether a character is a hexadecimal-digit character.
</p>
<p>
Unlike the standard C library <code class="function">isxdigit()</code> function,
this takes a <span class="type">char</span>, not an <span class="type">int</span>, so
don't call it on <code class="literal">EOF</code> but no need to cast to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> before passing a
possibly non-ASCII character in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td>any character
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an ASCII hexadecimal-digit character.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3026572"></a><h3>
<a name="g-ascii-digit-value"></a>g_ascii_digit_value ()</h3>
<a class="indexterm" name="id3026586"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_ascii_digit_value                 (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines the numeric value of a character as a decimal
digit. Differs from <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-digit-value"><code class="function">g_unichar_digit_value()</code></a> because it takes
a char, so there's no worry about sign extension if characters
are signed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td> an ASCII character.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> If <em class="parameter"><code>c</code></em> is a decimal digit (according to
<a class="link" href="glib-String-Utility-Functions.html#g-ascii-isdigit"><code class="function">g_ascii_isdigit()</code></a>), its numeric value. Otherwise, -1.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3026678"></a><h3>
<a name="g-ascii-xdigit-value"></a>g_ascii_xdigit_value ()</h3>
<a class="indexterm" name="id3026692"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_ascii_xdigit_value                (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Determines the numeric value of a character as a hexidecimal
digit. Differs from <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-xdigit-value"><code class="function">g_unichar_xdigit_value()</code></a> because it takes
a char, so there's no worry about sign extension if characters
are signed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td> an ASCII character.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> If <em class="parameter"><code>c</code></em> is a hex digit (according to
<a class="link" href="glib-String-Utility-Functions.html#g-ascii-isxdigit"><code class="function">g_ascii_isxdigit()</code></a>), its numeric value. Otherwise, -1.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3026785"></a><h3>
<a name="g-ascii-strcasecmp"></a>g_ascii_strcasecmp ()</h3>
<a class="indexterm" name="id3026798"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_ascii_strcasecmp                  (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s1,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s2);</pre>
<p>
Compare two strings, ignoring the case of ASCII characters.
</p>
<p>
Unlike the BSD <code class="function">strcasecmp()</code> function, this only recognizes standard
ASCII letters and ignores the locale, treating all non-ASCII
bytes as if they are not letters.
</p>
<p>
This function should be used only on strings that are known to be
in encodings where the bytes corresponding to ASCII letters always
represent themselves. This includes UTF-8 and the ISO-8859-*
charsets, but not for instance double-byte encodings like the
Windows Codepage 932, where the trailing bytes of double-byte
characters include all ASCII letters. If you compare two CP932
strings using this function, you will get false matches.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s1</code></em>&#160;:</span></p></td>
<td> string to compare with <em class="parameter"><code>s2</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>s2</code></em>&#160;:</span></p></td>
<td> string to compare with <em class="parameter"><code>s1</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> 0 if the strings match, a negative value if <em class="parameter"><code>s1</code></em> &lt; <em class="parameter"><code>s2</code></em>, 
  or a positive value if <em class="parameter"><code>s1</code></em> &gt; <em class="parameter"><code>s2</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3026944"></a><h3>
<a name="g-ascii-strncasecmp"></a>g_ascii_strncasecmp ()</h3>
<a class="indexterm" name="id3026958"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_ascii_strncasecmp                 (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s1,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s2,
                                                         <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> n);</pre>
<p>
Compare <em class="parameter"><code>s1</code></em> and <em class="parameter"><code>s2</code></em>, ignoring the case of ASCII characters and any
characters after the first <em class="parameter"><code>n</code></em> in each string.
</p>
<p>
Unlike the BSD <code class="function">strcasecmp()</code> function, this only recognizes standard
ASCII letters and ignores the locale, treating all non-ASCII
characters as if they are not letters.
</p>
<p>
The same warning as in <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strcasecmp"><code class="function">g_ascii_strcasecmp()</code></a> applies: Use this
function only on strings known to be in encodings where bytes
corresponding to ASCII letters always represent themselves.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s1</code></em>&#160;:</span></p></td>
<td> string to compare with <em class="parameter"><code>s2</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>s2</code></em>&#160;:</span></p></td>
<td> string to compare with <em class="parameter"><code>s1</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td>  number of characters to compare.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> 0 if the strings match, a negative value if <em class="parameter"><code>s1</code></em> &lt; <em class="parameter"><code>s2</code></em>, 
  or a positive value if <em class="parameter"><code>s1</code></em> &gt; <em class="parameter"><code>s2</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3027148"></a><h3>
<a name="g-ascii-strup"></a>g_ascii_strup ()</h3>
<a class="indexterm" name="id3027160"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_ascii_strup                       (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         <a class="link" href="glib-Basic-Types.html#gssize">gssize</a> len);</pre>
<p>
Converts all lower case ASCII letters to upper case ASCII letters.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></p></td>
<td> a string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em>&#160;:</span></p></td>
<td> length of <em class="parameter"><code>str</code></em> in bytes, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a newly allocated string, with all the lower case
              characters in <em class="parameter"><code>str</code></em> converted to upper case, with
              semantics that exactly match <a class="link" href="glib-String-Utility-Functions.html#g-ascii-toupper"><code class="function">g_ascii_toupper()</code></a>. (Note
              that this is unlike the old <a class="link" href="glib-String-Utility-Functions.html#g-strup"><code class="function">g_strup()</code></a>, which modified
              the string in place.)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3027285"></a><h3>
<a name="g-ascii-strdown"></a>g_ascii_strdown ()</h3>
<a class="indexterm" name="id3027298"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_ascii_strdown                     (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *str,
                                                         <a class="link" href="glib-Basic-Types.html#gssize">gssize</a> len);</pre>
<p>
Converts all upper case ASCII letters to lower case ASCII letters.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></p></td>
<td> a string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em>&#160;:</span></p></td>
<td> length of <em class="parameter"><code>str</code></em> in bytes, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a newly-allocated string, with all the upper case
              characters in <em class="parameter"><code>str</code></em> converted to lower case, with
              semantics that exactly match <a class="link" href="glib-String-Utility-Functions.html#g-ascii-tolower"><code class="function">g_ascii_tolower()</code></a>. (Note
              that this is unlike the old <a class="link" href="glib-String-Utility-Functions.html#g-strdown"><code class="function">g_strdown()</code></a>, which modified
              the string in place.)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3027422"></a><h3>
<a name="g-ascii-tolower"></a>g_ascii_tolower ()</h3>
<a class="indexterm" name="id3027435"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>               g_ascii_tolower                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Convert a character to ASCII lower case.
</p>
<p>
Unlike the standard C library <code class="function">tolower()</code> function, this only
recognizes standard ASCII letters and ignores the locale, returning
all non-ASCII characters unchanged, even if they are lower case
letters in a particular character set. Also unlike the standard
library function, this takes and returns a char, not an int, so
don't call it on <code class="literal">EOF</code> but no need to worry about casting to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a>
before passing a possibly non-ASCII character in.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td> any character.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the result of converting <em class="parameter"><code>c</code></em> to lower case.
              If <em class="parameter"><code>c</code></em> is not an ASCII upper case letter,
              <em class="parameter"><code>c</code></em> is returned unchanged.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3027554"></a><h3>
<a name="g-ascii-toupper"></a>g_ascii_toupper ()</h3>
<a class="indexterm" name="id3027567"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>               g_ascii_toupper                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> c);</pre>
<p>
Convert a character to ASCII upper case.
</p>
<p>
Unlike the standard C library <code class="function">toupper()</code> function, this only
recognizes standard ASCII letters and ignores the locale, returning
all non-ASCII characters unchanged, even if they are upper case
letters in a particular character set. Also unlike the standard
library function, this takes and returns a char, not an int, so
don't call it on <code class="literal">EOF</code> but no need to worry about casting to <a class="link" href="glib-Basic-Types.html#guchar"><span class="type">guchar</span></a>
before passing a possibly non-ASCII character in.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></p></td>
<td> any character.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the result of converting <em class="parameter"><code>c</code></em> to upper case.
              If <em class="parameter"><code>c</code></em> is not an ASCII lower case letter,
              <em class="parameter"><code>c</code></em> is returned unchanged.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3027686"></a><h3>
<a name="g-string-ascii-up"></a>g_string_ascii_up ()</h3>
<a class="indexterm" name="id3027700"></a><pre class="programlisting"><a class="link" href="glib-Strings.html#GString">GString</a>*            g_string_ascii_up                   (<a class="link" href="glib-Strings.html#GString">GString</a> *string);</pre>
<p>
Converts all lower case ASCII letters to upper case ASCII letters.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> a GString
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> passed-in <em class="parameter"><code>string</code></em> pointer, with all the lower case
              characters converted to upper case in place, with
              semantics that exactly match <a class="link" href="glib-String-Utility-Functions.html#g-ascii-toupper"><code class="function">g_ascii_toupper()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3027779"></a><h3>
<a name="g-string-ascii-down"></a>g_string_ascii_down ()</h3>
<a class="indexterm" name="id3027792"></a><pre class="programlisting"><a class="link" href="glib-Strings.html#GString">GString</a>*            g_string_ascii_down                 (<a class="link" href="glib-Strings.html#GString">GString</a> *string);</pre>
<p>
Converts all upper case ASCII letters to lower case ASCII letters.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> a GString
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> passed-in <em class="parameter"><code>string</code></em> pointer, with all the upper case
              characters converted to lower case in place, with
              semantics that exactly match <a class="link" href="glib-String-Utility-Functions.html#g-ascii-tolower"><code class="function">g_ascii_tolower()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3027872"></a><h3>
<a name="g-strup"></a>g_strup ()</h3>
<a class="indexterm" name="id3027886"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strup                             (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_strup</code> has been deprecated since version 2.2 and should not be used in newly-written code. This function is totally broken for the reasons discussed 
in the <a class="link" href="glib-String-Utility-Functions.html#g-strncasecmp"><code class="function">g_strncasecmp()</code></a> docs - use <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strup"><code class="function">g_ascii_strup()</code></a> or <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strup"><code class="function">g_utf8_strup()</code></a> instead.</p>
</div>
<p>
Converts a string to upper case.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> the string to convert.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the string

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3027995"></a><h3>
<a name="g-strdown"></a>g_strdown ()</h3>
<a class="indexterm" name="id3028010"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strdown                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_strdown</code> has been deprecated since version 2.2 and should not be used in newly-written code. This function is totally broken for the reasons discussed 
in the <a class="link" href="glib-String-Utility-Functions.html#g-strncasecmp"><code class="function">g_strncasecmp()</code></a> docs - use <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strdown"><code class="function">g_ascii_strdown()</code></a> or <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strdown"><code class="function">g_utf8_strdown()</code></a> 
instead.</p>
</div>
<p>
Converts a string to lower case.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> the string to convert.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the string 

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3028118"></a><h3>
<a name="g-strcasecmp"></a>g_strcasecmp ()</h3>
<a class="indexterm" name="id3028133"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_strcasecmp                        (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s1,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s2);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_strcasecmp</code> has been deprecated since version 2.2 and should not be used in newly-written code. See <a class="link" href="glib-String-Utility-Functions.html#g-strncasecmp"><code class="function">g_strncasecmp()</code></a> for a discussion of why this function 
  is deprecated and how to replace it.</p>
</div>
<p>
A case-insensitive string comparison, corresponding to the standard
<code class="function">strcasecmp()</code> function on platforms which support it.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s1</code></em>&#160;:</span></p></td>
<td> a string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>s2</code></em>&#160;:</span></p></td>
<td> a string to compare with <em class="parameter"><code>s1</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> 0 if the strings match, a negative value if <em class="parameter"><code>s1</code></em> &lt; <em class="parameter"><code>s2</code></em>, 
  or a positive value if <em class="parameter"><code>s1</code></em> &gt; <em class="parameter"><code>s2</code></em>.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3028281"></a><h3>
<a name="g-strncasecmp"></a>g_strncasecmp ()</h3>
<a class="indexterm" name="id3028296"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a>                g_strncasecmp                       (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s1,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *s2,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_strncasecmp</code> has been deprecated since version 2.2 and should not be used in newly-written code. The problem with <a class="link" href="glib-String-Utility-Functions.html#g-strncasecmp"><code class="function">g_strncasecmp()</code></a> is that it does the 
comparison by calling <code class="function">toupper()</code>/<code class="function">tolower()</code>. These functions are
locale-specific and operate on single bytes. However, it is impossible
to handle things correctly from an I18N standpoint by operating on
bytes, since characters may be multibyte. Thus <a class="link" href="glib-String-Utility-Functions.html#g-strncasecmp"><code class="function">g_strncasecmp()</code></a> is
broken if your string is guaranteed to be ASCII, since it's
locale-sensitive, and it's broken if your string is localized, since
it doesn't work on many encodings at all, including UTF-8, EUC-JP,
etc.
</p>
<p>
There are therefore two replacement functions: <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strncasecmp"><code class="function">g_ascii_strncasecmp()</code></a>,
which only works on ASCII and is not locale-sensitive, and
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-casefold"><code class="function">g_utf8_casefold()</code></a>, which is good for case-insensitive sorting of UTF-8.</p>
</div>
<p>
A case-insensitive string comparison, corresponding to the standard
<code class="function">strncasecmp()</code> function on platforms which support it.
It is similar to <a class="link" href="glib-String-Utility-Functions.html#g-strcasecmp"><code class="function">g_strcasecmp()</code></a> except it only compares the first <em class="parameter"><code>n</code></em> 
characters of the strings.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s1</code></em>&#160;:</span></p></td>
<td> a string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>s2</code></em>&#160;:</span></p></td>
<td> a string to compare with <em class="parameter"><code>s1</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td>
<td> the maximum number of characters to compare.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> 0 if the strings match, a negative value if <em class="parameter"><code>s1</code></em> &lt; <em class="parameter"><code>s2</code></em>, 
  or a positive value if <em class="parameter"><code>s1</code></em> &gt; <em class="parameter"><code>s2</code></em>.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3028551"></a><h3>
<a name="g-strreverse"></a>g_strreverse ()</h3>
<a class="indexterm" name="id3028564"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strreverse                        (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
<p>
Reverses all of the bytes in a string.
For example, <code class="literal">g_strreverse ("abcdef")</code> will result in "fedcba".
</p>
<p>
Note that <a class="link" href="glib-String-Utility-Functions.html#g-strreverse"><code class="function">g_strreverse()</code></a> doesn't work on UTF-8 strings containing multibyte characters. 
For that purpose, use <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strreverse"><code class="function">g_utf8_strreverse()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td>the string to reverse.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the same pointer passed in as <em class="parameter"><code>string</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3028662"></a><h3>
<a name="g-ascii-strtoll"></a>g_ascii_strtoll ()</h3>
<a class="indexterm" name="id3028678"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint64">gint64</a>              g_ascii_strtoll                     (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *nptr,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **endptr,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> base);</pre>
<p>
Converts a string to a <a class="link" href="glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> value.
This function behaves like the standard <code class="function">strtoll()</code> function
does in the C locale. It does this without actually
changing the current locale, since that would not be
thread-safe.
</p>
<p>
This function is typically used when reading configuration
files or other non-user input that should be locale independent.
To handle input from the user you should normally use the
locale-sensitive system <code class="function">strtoll()</code> function.
</p>
<p>
If the correct value would cause overflow, <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXINT64:CAPS"><code class="literal">G_MAXINT64</code></a> or <a class="link" href="glib-Limits-of-Basic-Types.html#G-MININT64:CAPS"><code class="literal">G_MININT64</code></a>
is returned, and <code class="literal">ERANGE</code> is stored in <code class="literal">errno</code>.  If the base is
outside the valid range, zero is returned, and <code class="literal">EINVAL</code> is stored
in <code class="literal">errno</code>.  If the string conversion fails, zero is returned, and
<em class="parameter"><code>endptr</code></em> returns <em class="parameter"><code>nptr</code></em> (if <em class="parameter"><code>endptr</code></em> is non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>nptr</code></em>&#160;:</span></p></td>
<td>    the string to convert to a numeric value.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>endptr</code></em>&#160;:</span></p></td>
<td>  if non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it returns the character after
          the last character used in the conversion.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base</code></em>&#160;:</span></p></td>
<td>    to be used for the conversion, 2..36 or 0
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> value or zero on error.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.12
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3028948"></a><h3>
<a name="g-ascii-strtoull"></a>g_ascii_strtoull ()</h3>
<a class="indexterm" name="id3028963"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint64">guint64</a>             g_ascii_strtoull                    (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *nptr,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **endptr,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> base);</pre>
<p>
Converts a string to a <a class="link" href="glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> value.
This function behaves like the standard <code class="function">strtoull()</code> function
does in the C locale. It does this without actually
changing the current locale, since that would not be
thread-safe.
</p>
<p>
This function is typically used when reading configuration
files or other non-user input that should be locale independent.
To handle input from the user you should normally use the
locale-sensitive system <code class="function">strtoull()</code> function.
</p>
<p>
If the correct value would cause overflow, <a class="link" href="glib-Limits-of-Basic-Types.html#G-MAXUINT64:CAPS"><code class="literal">G_MAXUINT64</code></a>
is returned, and <code class="literal">ERANGE</code> is stored in <code class="literal">errno</code>.  If the base is
outside the valid range, zero is returned, and <code class="literal">EINVAL</code> is stored
in <code class="literal">errno</code>.  If the string conversion fails, zero is returned, and
<em class="parameter"><code>endptr</code></em> returns <em class="parameter"><code>nptr</code></em> (if <em class="parameter"><code>endptr</code></em> is non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>nptr</code></em>&#160;:</span></p></td>
<td>    the string to convert to a numeric value.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>endptr</code></em>&#160;:</span></p></td>
<td>  if non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it returns the character after
          the last character used in the conversion.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base</code></em>&#160;:</span></p></td>
<td>    to be used for the conversion, 2..36 or 0
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> value or zero on error.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3029219"></a><h3>
<a name="G-ASCII-DTOSTR-BUF-SIZE:CAPS"></a>G_ASCII_DTOSTR_BUF_SIZE</h3>
<a class="indexterm" name="id3029234"></a><pre class="programlisting">#define G_ASCII_DTOSTR_BUF_SIZE (29 + 10)
</pre>
<p>
A good size for a buffer to be passed into <a class="link" href="glib-String-Utility-Functions.html#g-ascii-dtostr"><code class="function">g_ascii_dtostr()</code></a>.
It is guaranteed to be enough for all output of that function on systems with
 64bit IEEE-compatible doubles.
</p>
<p>
The typical usage would be something like:
</p>
<div class="informalexample"><pre class="programlisting">
  char buf[G_ASCII_DTOSTR_BUF_SIZE];

  fprintf (out, "value=%s\n", g_ascii_dtostr (buf, sizeof (buf), value));
</pre></div>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3029277"></a><h3>
<a name="g-ascii-strtod"></a>g_ascii_strtod ()</h3>
<a class="indexterm" name="id3029290"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gdouble">gdouble</a>             g_ascii_strtod                      (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *nptr,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **endptr);</pre>
<p>
Converts a string to a <a class="link" href="glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value.
This function behaves like the standard <code class="function">strtod()</code> function
does in the C locale. It does this without actually
changing the current locale, since that would not be
thread-safe.
</p>
<p>
This function is typically used when reading configuration
files or other non-user input that should be locale independent.
To handle input from the user you should normally use the
locale-sensitive system <code class="function">strtod()</code> function.
</p>
<p>
To convert from a <a class="link" href="glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> to a string in a locale-insensitive
way, use <a class="link" href="glib-String-Utility-Functions.html#g-ascii-dtostr"><code class="function">g_ascii_dtostr()</code></a>.
</p>
<p>
If the correct value would cause overflow, plus or minus <code class="literal">HUGE_VAL</code>
is returned (according to the sign of the value), and <code class="literal">ERANGE</code> is
stored in <code class="literal">errno</code>. If the correct value would cause underflow,
zero is returned and <code class="literal">ERANGE</code> is stored in <code class="literal">errno</code>.
</p>
<p>
This function resets <code class="literal">errno</code> before calling <code class="function">strtod()</code> so that
you can reliably detect overflow and underflow.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>nptr</code></em>&#160;:</span></p></td>
<td>    the string to convert to a numeric value.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>endptr</code></em>&#160;:</span></p></td>
<td>  if non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it returns the character after
          the last character used in the conversion.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3029537"></a><h3>
<a name="g-ascii-dtostr"></a>g_ascii_dtostr ()</h3>
<a class="indexterm" name="id3029550"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_ascii_dtostr                      (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *buffer,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> buf_len,
                                                         <a class="link" href="glib-Basic-Types.html#gdouble">gdouble</a> d);</pre>
<p>
Converts a <a class="link" href="glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> to a string, using the '.' as
decimal point. 
</p>
<p>
This functions generates enough precision that converting
the string back using <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strtod"><code class="function">g_ascii_strtod()</code></a> gives the same machine-number
(on machines with IEEE compatible 64bit doubles). It is
guaranteed that the size of the resulting string will never
be larger than <em class="parameter"><code>G_ASCII_DTOSTR_BUF_SIZE</code></em> bytes.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></p></td>
<td> A buffer to place the resulting string in
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf_len</code></em>&#160;:</span></p></td>
<td> The length of the buffer.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>d</code></em>&#160;:</span></p></td>
<td> The <a class="link" href="glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> to convert
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The pointer to the buffer with the converted string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3029696"></a><h3>
<a name="g-ascii-formatd"></a>g_ascii_formatd ()</h3>
<a class="indexterm" name="id3029709"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_ascii_formatd                     (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *buffer,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> buf_len,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         <a class="link" href="glib-Basic-Types.html#gdouble">gdouble</a> d);</pre>
<p>
Converts a <a class="link" href="glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> to a string, using the '.' as
decimal point. To format the number you pass in
a <code class="function">printf()</code>-style format string. Allowed conversion
specifiers are 'e', 'E', 'f', 'F', 'g' and 'G'. 
</p>
<p>
If you just want to want to serialize the value into a
string, use <a class="link" href="glib-String-Utility-Functions.html#g-ascii-dtostr"><code class="function">g_ascii_dtostr()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></p></td>
<td> A buffer to place the resulting string in
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf_len</code></em>&#160;:</span></p></td>
<td> The length of the buffer.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td> The <code class="function">printf()</code>-style format to use for the
         code to use for converting. 
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>d</code></em>&#160;:</span></p></td>
<td> The <a class="link" href="glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> to convert
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> The pointer to the buffer with the converted string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3029891"></a><h3>
<a name="g-strtod"></a>g_strtod ()</h3>
<a class="indexterm" name="id3029903"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gdouble">gdouble</a>             g_strtod                            (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *nptr,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **endptr);</pre>
<p>
Converts a string to a <a class="link" href="glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value.
It calls the standard <code class="function">strtod()</code> function to handle the conversion, but
if the string is not completely converted it attempts the conversion
again with <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strtod"><code class="function">g_ascii_strtod()</code></a>, and returns the best match.
</p>
<p>
This function should seldomly be used. The normal situation when reading
numbers not for human consumption is to use <a class="link" href="glib-String-Utility-Functions.html#g-ascii-strtod"><code class="function">g_ascii_strtod()</code></a>. Only when
you know that you must expect both locale formatted and C formatted numbers
should you use this. Make sure that you don't pass strings such as comma
separated lists of values, since the commas may be interpreted as a decimal
point in some locales, causing unexpected results.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>nptr</code></em>&#160;:</span></p></td>
<td>    the string to convert to a numeric value.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>endptr</code></em>&#160;:</span></p></td>
<td>  if non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it returns the character after
          the last character used in the conversion.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> the <a class="link" href="glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3030057"></a><h3>
<a name="g-strchug"></a>g_strchug ()</h3>
<a class="indexterm" name="id3030070"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strchug                           (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
<p>
Removes leading whitespace from a string, by moving the rest of the
characters forward.
</p>
<p>
This function doesn't allocate or reallocate any memory; it modifies <em class="parameter"><code>string</code></em>
in place. The pointer to <em class="parameter"><code>string</code></em> is returned to allow the nesting of functions.
</p>
<p>
Also see <a class="link" href="glib-String-Utility-Functions.html#g-strchomp"><code class="function">g_strchomp()</code></a> and <a class="link" href="glib-String-Utility-Functions.html#g-strstrip"><code class="function">g_strstrip()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td>a string to remove the leading whitespace from.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<em class="parameter"><code>string</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3030175"></a><h3>
<a name="g-strchomp"></a>g_strchomp ()</h3>
<a class="indexterm" name="id3030187"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strchomp                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string);</pre>
<p>
Removes trailing whitespace from a string.
</p>
<p>
This function doesn't allocate or reallocate any memory; it modifies <em class="parameter"><code>string</code></em> in
place. The pointer to <em class="parameter"><code>string</code></em> is returned to allow the nesting of functions.
</p>
<p>
Also see <a class="link" href="glib-String-Utility-Functions.html#g-strchug"><code class="function">g_strchug()</code></a> and <a class="link" href="glib-String-Utility-Functions.html#g-strstrip"><code class="function">g_strstrip()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td>a string to remove the trailing whitespace from.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<em class="parameter"><code>string</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3030292"></a><h3>
<a name="g-strstrip"></a>g_strstrip()</h3>
<a class="indexterm" name="id3030304"></a><pre class="programlisting">#define             g_strstrip( string )</pre>
<p>
Removes leading and trailing whitespace from a string. See <a class="link" href="glib-String-Utility-Functions.html#g-strchomp"><code class="function">g_strchomp()</code></a> and
<a class="link" href="glib-String-Utility-Functions.html#g-strchug"><code class="function">g_strchug()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td>a string to remove the leading and trailing whitespace from.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3030360"></a><h3>
<a name="g-strdelimit"></a>g_strdelimit ()</h3>
<a class="indexterm" name="id3030373"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strdelimit                        (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *delimiters,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> new_delimiter);</pre>
<p>
Converts any delimiter characters in <em class="parameter"><code>string</code></em> to <em class="parameter"><code>new_delimiter</code></em>.
Any characters in <em class="parameter"><code>string</code></em> which are found in <em class="parameter"><code>delimiters</code></em> are changed
to the <em class="parameter"><code>new_delimiter</code></em> character. Modifies <em class="parameter"><code>string</code></em> in place, and returns 
<em class="parameter"><code>string</code></em> itself, not a copy. The return value is to allow nesting such as
<code class="literal">g_ascii_strup (g_strdelimit (str, "abc", '?'))</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td>the string to convert.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>delimiters</code></em>&#160;:</span></p></td>
<td>a string containing the current delimiters, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the
standard delimiters defined in <a class="link" href="glib-String-Utility-Functions.html#G-STR-DELIMITERS:CAPS"><span class="type">G_STR_DELIMITERS</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_delimiter</code></em>&#160;:</span></p></td>
<td>the new delimiter character.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<em class="parameter"><code>string</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3030551"></a><h3>
<a name="G-STR-DELIMITERS:CAPS"></a>G_STR_DELIMITERS</h3>
<a class="indexterm" name="id3030564"></a><pre class="programlisting">#define	 G_STR_DELIMITERS	"_-|&gt; &lt;."
</pre>
<p>
The standard delimiters, used in <a class="link" href="glib-String-Utility-Functions.html#g-strdelimit"><code class="function">g_strdelimit()</code></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3030591"></a><h3>
<a name="g-strescape"></a>g_strescape ()</h3>
<a class="indexterm" name="id3030604"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strescape                         (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *source,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *exceptions);</pre>
<p>
Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\' and
'"' in the string <em class="parameter"><code>source</code></em> by inserting a '\' before
them. Additionally all characters in the range 0x01-0x1F (everything
below SPACE) and in the range 0x7F-0xFF (all non-ASCII chars) are
replaced with a '\' followed by their octal representation. Characters
supplied in <em class="parameter"><code>exceptions</code></em> are not escaped.
</p>
<p>
<a class="link" href="glib-String-Utility-Functions.html#g-strcompress"><code class="function">g_strcompress()</code></a> does the reverse conversion.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em>&#160;:</span></p></td>
<td>a string to escape.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>exceptions</code></em>&#160;:</span></p></td>
<td>a string of characters not to escape in <em class="parameter"><code>source</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a newly-allocated copy of <em class="parameter"><code>source</code></em> with certain
characters escaped. See above.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3030728"></a><h3>
<a name="g-strcompress"></a>g_strcompress ()</h3>
<a class="indexterm" name="id3030741"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strcompress                       (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *source);</pre>
<p>
Replaces all escaped characters with their one byte equivalent. It
does the reverse conversion of <a class="link" href="glib-String-Utility-Functions.html#g-strescape"><code class="function">g_strescape()</code></a>. 
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em>&#160;:</span></p></td>
<td>a string to compress.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a newly-allocated copy of <em class="parameter"><code>source</code></em> with all escaped 
character compressed.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3030817"></a><h3>
<a name="g-strcanon"></a>g_strcanon ()</h3>
<a class="indexterm" name="id3030830"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strcanon                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *valid_chars,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> substitutor);</pre>
<p>
For each character in <em class="parameter"><code>string</code></em>, if the character is not in <em class="parameter"><code>valid_chars</code></em>,
replaces the character with <em class="parameter"><code>substitutor</code></em>. Modifies <em class="parameter"><code>string</code></em> in place, 
and return <em class="parameter"><code>string</code></em> itself, not a copy. The return value is to allow
nesting such as <code class="literal">g_ascii_strup (g_strcanon (str, "abc", '?'))</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td>a nul-terminated array of bytes.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>valid_chars</code></em>&#160;:</span></p></td>
<td>bytes permitted in <em class="parameter"><code>string</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>substitutor</code></em>&#160;:</span></p></td>
<td>replacement character for disallowed bytes.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<em class="parameter"><code>string</code></em>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3030981"></a><h3>
<a name="g-strsplit"></a>g_strsplit ()</h3>
<a class="indexterm" name="id3030993"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>**             g_strsplit                          (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *delimiter,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> max_tokens);</pre>
<p>
Splits a string into a maximum of <em class="parameter"><code>max_tokens</code></em> pieces, using the given
<em class="parameter"><code>delimiter</code></em>. If <em class="parameter"><code>max_tokens</code></em> is reached, the remainder of <em class="parameter"><code>string</code></em> is appended
to the last token. 
</p>
<p>
As a special case, the result of splitting the empty string "" is an empty
vector, not a vector containing a single string. The reason for this
special case is that being able to represent a empty vector is typically
more useful than consistent handling of empty elements. If you do need
to represent empty elements, you'll need to check for the empty string
before calling <a class="link" href="glib-String-Utility-Functions.html#g-strsplit"><code class="function">g_strsplit()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> a string to split.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>delimiter</code></em>&#160;:</span></p></td>
<td> a string which specifies the places at which to split the string.
    The delimiter is not included in any of the resulting strings, unless
    <em class="parameter"><code>max_tokens</code></em> is reached.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_tokens</code></em>&#160;:</span></p></td>
<td> the maximum number of pieces to split <em class="parameter"><code>string</code></em> into. If this is
             less than 1, the string is split completely.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a newly-allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings. Use 
   <a class="link" href="glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> to free it.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3031180"></a><h3>
<a name="g-strsplit-set"></a>g_strsplit_set ()</h3>
<a class="indexterm" name="id3031195"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>**             g_strsplit_set                      (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *delimiters,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> max_tokens);</pre>
<p>
Splits <em class="parameter"><code>string</code></em> into a number of tokens not containing any of the characters
in <em class="parameter"><code>delimiter</code></em>. A token is the (possibly empty) longest string that does not
contain any of the characters in <em class="parameter"><code>delimiters</code></em>. If <em class="parameter"><code>max_tokens</code></em> is reached, the
remainder is appended to the last token.
</p>
<p>
For example the result of g_strsplit_set ("abc:def/ghi", ":/", -1) is a
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated vector containing the three strings "abc", "def", 
and "ghi".
</p>
<p>
The result if g_strsplit_set (":def/ghi:", ":/", -1) is a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated
vector containing the four strings "", "def", "ghi", and "".
</p>
<p>
As a special case, the result of splitting the empty string "" is an empty
vector, not a vector containing a single string. The reason for this
special case is that being able to represent a empty vector is typically
more useful than consistent handling of empty elements. If you do need
to represent empty elements, you'll need to check for the empty string
before calling <a class="link" href="glib-String-Utility-Functions.html#g-strsplit-set"><code class="function">g_strsplit_set()</code></a>.
</p>
<p>
Note that this function works on bytes not characters, so it can't be used 
to delimit UTF-8 strings for anything but ASCII characters.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td>
<td> The string to be tokenized
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>delimiters</code></em>&#160;:</span></p></td>
<td> A nul-terminated string containing bytes that are used
             to split the string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_tokens</code></em>&#160;:</span></p></td>
<td> The maximum number of tokens to split <em class="parameter"><code>string</code></em> into. 
             If this is less than 1, the string is split completely
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a newly-allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings. Use 
   <a class="link" href="glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> to free it.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3031421"></a><h3>
<a name="g-strfreev"></a>g_strfreev ()</h3>
<a class="indexterm" name="id3031434"></a><pre class="programlisting">void                g_strfreev                          (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **str_array);</pre>
<p>
Frees a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings, and the array itself.
If called on a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> value, <a class="link" href="glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> simply returns.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>str_array</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings to free.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3031526"></a><h3>
<a name="g-strconcat"></a>g_strconcat ()</h3>
<a class="indexterm" name="id3031539"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strconcat                         (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *string1,
                                                         ...);</pre>
<p>
Concatenates all of the given strings into one long string.  The returned string
should be freed when no longer needed.  
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p>
The variable argument list <span class="emphasis"><em>must</em></span> end with <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. 
If you forget the <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a class="link" href="glib-String-Utility-Functions.html#g-strconcat"><code class="function">g_strconcat()</code></a> will start appending
random memory junk to your string.
</p>
</div>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string1</code></em>&#160;:</span></p></td>
<td>The first string to add, which must not be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of strings to append to the string.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a newly-allocated string containing all the string arguments.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3031675"></a><h3>
<a name="g-strjoin"></a>g_strjoin ()</h3>
<a class="indexterm" name="id3031687"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strjoin                           (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *separator,
                                                         ...);</pre>
<p>
Joins a number of strings together to form one long string, with the optional
<em class="parameter"><code>separator</code></em> inserted between each of them.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>separator</code></em>&#160;:</span></p></td>
<td>a string to insert between each of the strings, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of strings to join.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a newly-allocated string containing all of the strings joined
together, with <em class="parameter"><code>separator</code></em> between them.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3031795"></a><h3>
<a name="g-strjoinv"></a>g_strjoinv ()</h3>
<a class="indexterm" name="id3031808"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*              g_strjoinv                          (const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *separator,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **str_array);</pre>
<p>
Joins a number of strings together to form one long string, with the optional
<em class="parameter"><code>separator</code></em> inserted between each of them.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>separator</code></em>&#160;:</span></p></td>
<td>a string to insert between each of the strings, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>str_array</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings to join.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a newly-allocated string containing all of the strings joined
together, with <em class="parameter"><code>separator</code></em> between them.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3031923"></a><h3>
<a name="g-strv-length"></a>g_strv_length ()</h3>
<a class="indexterm" name="id3031938"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_strv_length                       (<a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **str_array);</pre>
<p>
Returns the length of the given <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated 
string array <em class="parameter"><code>str_array</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str_array</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> length of <em class="parameter"><code>str_array</code></em>.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3032038"></a><h3>
<a name="g-strerror"></a>g_strerror ()</h3>
<a class="indexterm" name="id3032050"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_strerror                          (<a class="link" href="glib-Basic-Types.html#gint">gint</a> errnum);</pre>
<p>
Returns a string corresponding to the given error code, e.g. "no such process".
You should use this function in preference to <code class="function">strerror()</code>, because it returns a
string in UTF-8 encoding, and since not all platforms support the 
<code class="function">strerror()</code> function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>errnum</code></em>&#160;:</span></p></td>
<td>the system error number. See the standard C <code class="literal">errno</code>
documentation.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a UTF-8 string describing the error code.
If the error code is unknown, it returns "unknown error (&lt;code&gt;)".
The string can only be used until the next call to <a class="link" href="glib-String-Utility-Functions.html#g-strerror"><code class="function">g_strerror()</code></a>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3032158"></a><h3>
<a name="g-strsignal"></a>g_strsignal ()</h3>
<a class="indexterm" name="id3032171"></a><pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a>*        g_strsignal                         (<a class="link" href="glib-Basic-Types.html#gint">gint</a> signum);</pre>
<p>
Returns a string describing the given signal, e.g. "Segmentation fault".
You should use this function in preference to <code class="function">strsignal()</code>, because it returns a
string in UTF-8 encoding, and since not all platforms support the
<code class="function">strsignal()</code> function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>signum</code></em>&#160;:</span></p></td>
<td>the signal number. See the <code class="literal">signal</code>
documentation.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>a UTF-8 string describing the signal.
If the signal is unknown, it returns "unknown signal (&lt;signum&gt;)".
The string can only be used until the next call to <a class="link" href="glib-String-Utility-Functions.html#g-strsignal"><code class="function">g_strsignal()</code></a>.


</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3032275"></a><div class="refsect2" lang="en"><a name="id3032276"></a></div>
<hr>
<div class="refsect2" lang="en"><a name="id3032277"></a></div>
</div>
</div>
</body>
</html>
